package com.lagou.niancheng.rpc.server.spring;

import com.lagou.niancheng.rpc.common.converter.Converter;
import com.lagou.niancheng.rpc.common.converter.FastJsonConverter;
import org.springframework.context.annotation.Import;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 开启服务提供
 *
 * @author 大犬
 * @date 2020/5/1
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Import(ServiceProviderFactoryRegistrar.class)
public @interface EnableSimpleRpc {
    int port() default 9000;

    int workerThreadPoolSize() default 4;

    int masterThreadPoolSize() default  1;

    Class<? extends Converter> converterClass() default FastJsonConverter.class;
}
